package cn.lucky.springcloud.client;

import cn.lucky.springcloud.entities.CommonResult;
import cn.lucky.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author lingpeng.jiang
 * @create 2020-12-27-15:50
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface OpenfeignClient {


    @GetMapping("/payment/get/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);


    @GetMapping("/payment/list")
    CommonResult<Payment> queryPayment();

    @GetMapping("/payment/openfeign/timeout")
    String testOpenfeignTimeOut();
}
